package com.example.common;

public class CommonPresenter implements ICommonPresenter {
    private ICommonModel model;
    private ICommonView mView;

    public CommonPresenter(ICommonView pView, ICommonModel pModel) {
        mView = pView;
        model = pModel;
    }

    @Override
    public void getData(int whichApi, int loadType, Object... pP) {
        model.getData(whichApi, loadType, this, pP);
    }

    @Override
    public void onSuccess(int whichApi, int loadType, Object... po) {
        mView.onSuccess(whichApi, loadType, po);
    }

    @Override
    public void onFailed(Throwable pThrowable) {
        mView.onFailed(pThrowable);
    }
}
